import BaseController from "../../cfw/mvc/BaseController";
import ToiletManager from "./ToiletManager";
import ModuleManager from "../../cfw/module/ModuleManager";
import { UIIndex } from "../../cfw/tools/Define";
import LobbyController from "../lobby/LobbyController";

export default class ToiletController extends BaseController {

    private static ins: ToiletController;

    static instance() {
        if (!this.ins) {
            this.ins = new ToiletController()
        }
        return this.ins;
    }

    intoLayer() {
        this.intoRoom();
        // this.pushView('prefabs/ToiletDoorView', 'ToiletDoorView', ToiletManager.instance(), ModuleManager.getLoader(), UIIndex.ROOT)
    }

    intoRoom() {
        this.pushView('prefabs/ToiletRoomView', 'ToiletRoomView', ToiletManager.instance(), ModuleManager.getLoader(), UIIndex.ROOT)
    }

    intoWash() {
        this.pushView('prefabs/ToiletWashView', 'ToiletWashView', ToiletManager.instance(), ModuleManager.getLoader(), UIIndex.ROOT)
    }

    gotoLobby(){
        LobbyController.instance().intoLayer()
    }
}
